import request from '@/utils/request'

// 图库列表
export function galleryList(data){
    return request({
      url: '/v1/gallery/gallery/list',
      method: 'POST',
      data
    })
}

// 上传图片
export function galleryCreate(data){
    return request({
      url: '/v1/gallery/gallery/create',
      method: 'POST',
      data
    })
}

// 修改图片
export function galleryEdit(data){
    return request({
      url: '/v1/gallery/gallery/edit',
      method: 'POST',
      data
    })
}

// 记录详情
export function galleryDetail(data){
    return request({
      url: '/v1/gallery/gallery/detail',
      method: 'POST',
      data
    })
}

// 删除图片
export function galleryDelete(data){
    return request({
      url: '/v1/gallery/gallery/delete',
      method: 'POST',
      data
    })
}

// 一键清理未使用图片
export function galleryClearning(data){
    return request({
      url: '/v1/gallery/gallery/cleaning-unused-images',
      method: 'POST',
      data
    })
}

// 商品SkU列表
export function querySkuList(data){
  return request({
    url: '/v1/goods/sku/list',
    method: 'POST',
    data
  })
}

// 商品SpU列表
export function querySpuList(data){
  return request({
    url: '/v1/goods/spu/list',
    method: 'POST',
    data
  })
}

// 推送图库到赛盒
export function galleryPushSaiHe(data){
  return request({
    url: '/v1/gallery/gallery/push-to-sai-he',
    method: 'POST',
    data,
    timeout: 600000
  })
}

// 设置sku主图
export function setAttrImg(data){
  return request({
    url: '/v1/goods/sku/set-attr-img',
    method: 'POST',
    data
  })
}


